#pragma once

#include <iostream>
#include <unistd.h>

namespace TaskModule
{
    class Task
    {
    public:
        Task()
        {}

        Task(int x, int y)
            :_x(x), _y(y)
        {}

        void Excute()
        {
            sleep(1);//模拟任务处理的时长
            _result = _x + _y;
        }

        int X(){return _x;}
        int Y(){return _y;}
        int Result(){return _result;}

        ~Task()
        {}
    private:
        int _x;
        int _y;
        int _result;
    };
}